Digital control circuit for switching power supply with serial data input

ABSTRACT

A method is disclosed for converting DC power from a first voltage level on an input to a different voltage level on an output for delivery to a load. The method includes switching current in a switching operation from the input to the output through an inductive element and measuring the voltage/current parameters on the input and output. A control algorithm is then utilized to determine control parameters necessary to make a control move to effect the switching operation, the control algorithm utilizing as inputs the measured voltage/current parameters. A digital control system controls the switching operation, which digital control system is operable to be controlled by the control algorithm. Configuration data is received on a serial data bus for configuring the control algorithm. Thereafter, the operation of the control algorithm is modified in response to receiving the configuration information.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of U.S. Pat. No. 7,042,201, issuedMay 9, 2006, and entitled, “DIGITAL CONTROL CIRCUIT FOR SWITCHING POWERSUPPLY WITH PATTERN GENERATOR,” which is incorporated herein byreference.

TECHNICAL FIELD OF THE INVENTION

The present invention pertains in general to switching power suppliesand, more particularly, to the digital control circuit for controllingthe operation thereof.

BACKGROUND OF THE INVENTION

Switching power supplies utilize a plurality of switches which areturned on and off to switch an input DC voltage across a transformer toa load, the output voltage at a different DC voltage level. By switchingthe current inductively coupled through the transformer to the load in aparticular manner, a DC output voltage at a different voltage level thanthe input DC voltage level can be provided to the load. The control ofthe switching is typically facilitated with some type of controlcircuit. This control circuit can be an analog control circuit formedfrom a plurality of analog discrete devices, or it can be a digitalcircuit.

In digital control circuits, Digital Signal Processors (DSPs) have beenutilized. The DSPs control the duty cycle and relative timing of theswitches such that the edges of each control pulse to the varioustransistor switches controlling power delivery to the load will bevaried. In order to perform this operation in the digital domain, theDSP must perform a large number of calculations, which requires a fairlysignificant amount of code to be generated to support a specific powersupply topology, operating frequency, component characteristics andperformance requirements. For example, inductor size decreases withincreasing PWM frequency: dead times increase with increasing transistorturn-off times, and so on. Although DSPs can handle the regulationtasks, they are fairly complex and expensive and code changes in powersupply applications are difficult.

SUMMARY OF THE INVENTION

The present invention disclosed and claimed herein, in one aspectthereof, comprises a method for converting DC power from a first voltagelevel on an input to a different voltage level on an output for deliveryto a load. The method includes switching current in a switchingoperation from the input to the output through an inductive element andmeasuring the voltage/current parameters on the input and output. Acontrol algorithm is then utilized to determine control parametersnecessary to make a control move to effect the switching operation, thecontrol algorithm utilizing as inputs the measured voltage/currentparameters. A digital control system controls the switching operation,which digital control system is operable to be controlled by the controlalgorithm. Configuration data is received on a serial data bus forconfiguring the control algorithm. Thereafter, the operation of thecontrol algorithm is modified in response to receiving the configurationinformation.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present invention and theadvantages thereof, reference is now made to the following descriptiontaken in conjunction with the accompanying Drawings in which:

FIG. 1 illustrates an overall block diagram of a switching power supplyutilizing the digital control circuit of the present disclosure;

FIG. 2 illustrates a schematic diagram of the switching portion of ahalf-bridge power supply;

FIG. 3 illustrates the timing diagram for the control pulses to theswitching power supply;

FIG. 4 illustrates a block diagram for the pattern generator for thepresent disclosure utilizing an external memory;

FIG. 5 illustrates a single chip version of the embodiment of FIG. 4;

FIG. 6 illustrates a diagrammatic view of the pattern generationoperation;

FIG. 7 illustrates a flow chart depicting the control operation; and

FIG. 8 illustrates a flow chart depicting the pattern generationoperation.

DETAILED DESCRIPTION OF THE INVENTION

Referring now to FIG. 1, there is illustrated a top level schematicdiagram for the switching power supply of the present embodiment. Themain portion of the power supply comprises a primary switch 102 that isoperable to receive an input voltage on a node 104, this being a DCvoltage, and ground on a node 106. The primary switch group 102 iscoupled through an isolation transformer 108 to a secondary switch group110. The secondary switch group 110 is operable to drive an outputvoltage node 112 that is connected to one terminal of a load 114, thesecondary switch group 110 also having a ground connection on a node116, the load 114 disposed between the node 112 and the node 116. Thetwo switch groups 102 and 110 are operable to operate in conjunctionwith various pulse inputs on a control bus 118 associated with theprimary switch group 102 and with various pulse inputs on a control bus126 associated with the secondary switch group 110.

A digital control circuit 124 is provided which is operable to controlthe operation of the primary switch group 102 and the secondary switchgroup 110. The nodes 104, 106 and 137 are provided as inputs to thedigital control circuit 124 for sensing the voltage and current on theprimary, the digital control circuit 124 generating the information onthe bus 118 for control of the primary switch group 102. The controlcircuit 124 must be isolated from the secondary switch group 110. Thisis facilitated by driving a bus 126 through an isolation circuit 128,such as an opto-isolator, to drive the bus 120. Similarly, the controlcircuit 124 is operable to sense the voltage and current levels on theoutput node 112 through sense lines 130 which are also connected throughan isolation circuit 132 to the digital control circuit 124. The digitalcontrol circuit 124 is also interfaced to a bus 136 to receive externalcontrol/configuration information. This can be facilitated with a serialdata bus such as an SMB serial data bus.

Referring now to FIG. 2, there is illustrated a detailed schematicdiagram of the primary switch group 102, isolation transformer 108 andsecondary switch group 110. The node 104 is connected to one side of thesource-drain path of a power switching transistor 202, the other sidethereof connected to a node 204. Node 204 is connected to one side ofthe primary of transformer 108, a primary 206. The other side of primary206 is connected to a node 208. Node 208 is coupled to node 104 througha capacitor 210. Node 106 is coupled to one side of the source-drainpath of a switching transistor 212, the other side thereof connected tonode 204. Node 208 is coupled through a capacitor 214 to node 106. Adiode 218 has the anode thereof connected to node 208 and the cathodethereof connected to a node 220, node 220 connected to one side of thesource-drain path of a switching transistor 222, the other side thereofconnected to node 204.

Switching transistor 212 is controlled by a switching pulse P1, the gateof switching transistor 202 controlled by a switching pulse P2 and thegate of switching transistor 222 controlled by switching pulse P3.Switching pulses P1, P2 and P3 all form part of the bus 118.

The secondary switch group 110 is comprised of a switching transistor230 having source-drain path thereof connected between the node 116 anda node 232, the gate thereof controlled by a switching pulse P5. Node232 is connected to one side of a winding 234 which forms part of thesecondary of the isolation transformer 108. The other side of winding234 is connected to a center tap node 236, node 236 connected to oneside of a winding 238, the other side thereof connected to a node 240.Winding 238 and winding 234 form the secondary of transformer 108.

Node 240 is connected to one side of the source-drain path of aswitching transistor 242, the other side thereof connected to node 116and the gate thereof connected to a switching pulse P4. An inductor 244is connected between node 236 and the output node 112. The output node112 is coupled to the ground node 116 through a capacitor 246 which isconnected proximate to the other side of the source-drain path oftransistor 230 and coupled through a capacitor 248 to node 116 proximateto the other side of the source-drain path of switching transistor 242.

Referring now to FIG. 3, there is illustrated a timing diagram forgenerating the switching pulses to operate the switch of FIG. 2. Theswitching pulse P1 is a pulse-width modulated switching pulse having arising edge 320. The rising edge 320 changes the level to a high level322 which then returns to the low level at a falling edge 324. Theswitching pulse P2 is delayed from the falling edge 324 by a delayt_(d1). The rising edge 326 changes the level of switching pulse P2 to ahigh level 328 followed by a change back to a low level having a fallingedge 330. The switching pulse P3 goes from a low level to a high levelahead of the falling edge of P1 by delay time t_(d2). The switchingpulse P3 goes low ahead of the falling edge of P2 by delay time t_(d3).

In the output switch, the switching pulse P4 goes from a low level to ahigh level 336 at a rising edge 338. The rising edge 338 is delayed fromthe rising edge 320 by a delay t_(d3). The switching pulse P4 returns toa low level ahead of the falling edge P2 by delay time t_(d3). Theswitching pulse P5 goes from a low level to a high level 342 at a risingedge 344 which is delayed from edge 326 of switching pulse P2 by a delayt_(d3). Switching pulse P5 returns to a low level ahead of the risingedge of P3 by delay t_(d3).

It can be seen that the switches 202 and 212 in FIG. 2 are controlled byswitching pulses P1 and P2. The delay t_(d1) is the duration of timerequired for transistor 212 to go from a conducting state to anon-conducting state and prior to transistor 202 going to a conductingstate. The delay t_(d1) is a delay that is required in order to ensurethat the switches are completely off such that connecting the node 204to the ground node 106 does not cause current to flow through transistor202. This could result in a “shoot-through” current spike. Dependingupon the circuit components and operating frequency, it may be requiredto vary this delay. Similarly, transistor 222 will be turned on prior toturning off switch 202 with the delay t_(d2) allowing the diode 218 tobe placed in parallel with the primary 206 prior to turning offtransistor 202. Similarly, on the output switch, it is necessary thattransistor 242 is maintained in a non-conducting state until transistor322 is fully turned on and node 204 is sufficiently grounded. Further,it is necessary that the falling edge 346 be delayed until thetransistor 222 has fully turned on, which requires the delay t_(d3).This timing is conventional and, depending upon the application, thevarious delays will be adjusted, these adjustments due to the size ofthe load, circuit characteristics and operating frequency.

Referring now to FIG. 4, there is illustrated a block diagram of thecontrol circuit. At the heart of the control circuit is an MCU chip 402which is an integrated circuit that is manufactured by Cygnal IntegratedProducts, the present Assignee, as part no. C8051F124. This MCUintegrated circuit 402 is described in U.S. patent application Ser. No.09/885,459, filed Jun. 19, 2000, and entitled FIELD PROGRAMMABLEMIXED-SIGNAL INTEGRATED CIRCUIT, which is incorporated herein byreference. At the heart of this MCU 402 is a 50 MIPS processing core 404that utilizes an 8051 microprocessor topology. From a memory standpoint,there is provided on chip a flash memory 406, a clock 408 and ananalog-to-digital converter 410. The analog-to-digital converter (ADC)410 is connected to four analog input lines 412 through a multiplexer414 and a programmable amplifier 418. The analog lines 412 are controlvariables that convert primary and secondary side voltages and currentsinto digital signals for use by the processing core 404. Core 502 isconnected to a Direct Memory Access function 420 and to a state machinefor controlling an external dual-port memory 422. The dual-port memory422 is configured such that it has a basic size of a 256×8 memory arrayto store a switching pulse pattern for all of the switching pulses,which memory array 422 is duplicated with a second level of addressing,such that the overall memory is actually 512×8 in size. This is referredto as a “ping pong” memory. The exact capacity of the memory isdetermined by the timing complexity of the system. Effectively, thememory space is divided into two sections in this embodiment, each256×8. By utilizing the most significant address bit (MSB) as the pingpong address bit, the data can be written in one part of the memory andextracted from the other part of the memory.

Core 404 calculates updated switching pulses and stores them in acompressed format in memory 406, DMA 420 periodically moves this datainto one-half of the dual-port memory 422. The data bus contains a highbyte which describes the pulse “hold” time and the low-byte specifiesthe time a transition occurs. These two pieces of information completelydescribe the placement and duration of a pulse. Hold time data isavailable to the state machine while time transition data is availableon the databus. In general, the state machine sequentially dictates thisdata and clocks a latch at times specified by the data. When alladdresses in the current half of the memory 422 have been read by thestate machine, the most significant address bit is asserted giving thestate machine access to the updated data in the other half of the memory422.

For input of data to the memory from the MCU 402, there is provided acontrol bus 430 that is output from the interface 420 for providingcontrol signals to the memory 422. Data is output on a data bus 432,this being an 8-bit wide data bus. Address information is output on anaddress bus 434 that is associated with the chip size of the dual-portmemory 422. This is an 8-bit address bus to allow the addressing of 2568-bit words, the operation of which will be described hereinbelow. Inaddition, there is provided an additional address bit, the ping pongaddress bit, on a line 436 that allows the full range of the dual portmemory 422 to be addressed. This basically changes the “page” in thememory.

On the board side of memory 422, there are provided five data lines 440,it being understood that there could be upwards of eight data lines,although only five are required for the switching pulses P1-P5. Acontrol input 442 is provided that provides for the Read Only operation,this comprising an Output Enable signal (OE), a Chip Enable signal (CE)and other controls necessary to read data from the memory. Addressing ofthe access page is provided by an 8-bit address bus 444, this addressingone of the 256 8-bit address locations to output potentially 8-bits, ofonly which five are used on the data lines 440. However, it is notedthat the memory accessed in the Read operation on the board side is adifferent page than that associated with the Write operation on the chipside. The ping pong address line 436 is operable to select one page ofmemory for writing up to 256 8-byte words and the other page for readingup to 256 8-byte words. As such, there would be required an inverter notshown for providing a ninth bit to the Read side address input. The pingpong address bit on line 436 is controlled by a first timer 450 with theaddress on lines 444 controlled by a second timer 452. The timers areoperable to be synchronized with the duty cycle, such that the addresslocations, on the board side for the Read operation are sequencedthrough from the first location to a second end location which could bethe entire 256 8-byte words in the Read operation or less. At the end ofeach duty cycle, the page will be “flipped” with the ping pong addressbyte such that the background page written during the previous dutycycle on the chip side can then be read from on the board side. Duringthe Read operation, the interface 420 under control of the processorcore 404 is operable to Write any information to the chip side of thememory to change the “pattern” contained therein for output in asubsequent Read operation.

It should be understood that a dual-port memory is illustrated, but anyother type of addressing scheme could be utilized. If the processor corememory were fast enough, the operation could actually be multiplexed anda single port memory could be utilized.

Referring now to FIG. 5, there is illustrated an alternate embodiment ofthe embodiment of FIG. 4 wherein the memory is disposed on chip. Anintegrated circuit MCU 502 is illustrated which contains a processingcore 504 and a memory 506, memory 506 being a memory of the Flash Type.In this embodiment, the memory is a dual port memory that is 16-bitswide (×16) with a small word capacity (typically less than 128 bytes).In this embodiment, the on chip Flash 506 is operable to not onlyprovide more storage for data and the such, but also provide storage forthe pattern associated with the pattern generation operation. Theoperation of the Flash 506 is controlled with a timer block or clock 508which is operable to operate the Flash 506 as a dual-port memory suchthat the Read side of the dual-port memory can read one page of memorywhereas the Write side writes a separate page of memory. During the Readoperation, the addresses are sequenced through from an initial value toa termination value. On the Write side data is randomly written to thelocations that need to be changed in order to adjust edges of thepulses, as will be described hereinbelow. As was the case with theembodiment of FIG. 4, there will be provided four data lines 512 thatprovide the input voltage, output voltage, input current and outputcurrent to a multiplexer 514 through a programmable amplifier 516 to anADC 518. This is utilized by the core 504 for the control operation. Thememory output is output to a 5-bit wide bus 520 to provide the switchingpulse output values P1-P5 through an input/output (I/O) block 522. Thisconfiguration is substantially identical to that of FIG. 4 with theexception that all the circuitry is contained on chip.

Referring now to FIG. 6, there is illustrated a diagrammatic view of theoverall operation for both control and pattern generation. In thecontrol operation, there is provided a sensor block 602 that is operableto measure the current and voltages. This is basically the ADC portionof the circuit. This information is measured and then passed to acontrol algorithm block 604 for the purpose of determining what thepulse width modulation (PWM) variables will be, this primarily being anadjustment to the duty cycle. By measuring the currents and voltages andadjusting the duty cycle to provide the appropriate control, a viableduty cycle can be achieved. This is an iterative process where a newduty cycle value is calculated to provide a “control move” that providesan incremental change to the duty cycle in one direction or the other.This new duty cycle is input to a control register 606. The value in thecontrol register 606 is then passed to the pattern generation portion toallow the control move to be applied.

In the pattern generation operation, the duty cycle is changed andcompared to the previous duty cycle to determine what type of changemust be facilitated. For example, if the duty cycle decreases by acertain percentage, this will indicate that each edge in each of theswitching pulses P1-P5 must be moved relative to the initial edge ofswitching pulse P1. The pattern is actually stored in a memory area 608illustrated as a memory map of 5-bits for each row of memory, each rowrepresenting a slice of time and each bit representing the value of theassociated switching pulse for that slice of time. The value of thesebits is controlled by a pattern generator block 610 which is operable toaddress a particular row that is determined to require a change. It canbe seen in the memory map that each column constitutes the sequence ofvalues in time from the beginning of the duty cycle to the end of theduty cycle for each switching pulse. If a value is at a “logic zero,”this indicates a low voltage level. If the value is at a logic “one”level value, this indicates a high voltage level. Each row represents atime segment with the total number of rows, i.e., 256, defining theresolution over time of a switching pulse. By changing a logic “zero”adjacent to a logic “one” to a logic “one,” this will effectively movethe edge transition in one direction or the other. As such, if it isdetermined that an edge must be moved by two time segments, i.e., tworows, then only two rows need to be addressed.

The pattern generator block 610 is operable to receive as an input thedelay constants. This allows all of the edges to be proportionallychanged. Additionally, these delay constants can be changed by the userto configure the overall PWM operation on the fly if necessary.

Referring now to FIG. 7, there is illustrated a flow chart for theoperation of control. This is initiated at a function block 702 and thenproceeds to a function block 704 wherein the system is initialized.During initialization, a initial pattern can be loaded from another areain memory, if necessary, at a set frequency. The initialization is doneat a median frequency such that a pattern exists in the memory. This isthen applied and then a measurement made, as indicated by a functionblock 706, of the voltage and current. This voltage and currentmeasurement is then processed through an algorithm to calculate the nextchange at the duty cycle, as indicated by a function block 708. Thischange in duty cycle is an iterative procedure which determines in whichdirection the duty cycle should changed and by how much. This is thenstored at the control register, as indicated by a function block 710.The program will then flow back to the input of function block 706 toagain measure the voltage and current in the next interface step. Eachstep of storing the duty cycle in the control register will occur duringone Period of the clock φ₁. Once stored in the control register duringthe Period, the pattern generator will rewrite the pattern and, at theend of the duty cycle, there will be a transfer over to the Read side.

Referring now to FIG. 8, there is illustrated a flow chart depicting theoperation of the pattern generator, which is initiated at a block 802.The program then flows to a function block 804 to read the controlregister and then to a function block 806 to determine if the duty cyclehas changed. If not, the program will flow back to the input of functionblock 804. If the duty cycle has changed, the program will flow to afunction block 808 to recalculate the edges of each of the pulses todetermine where the rising and falling edges will be. The program thenflows to function block 810 to address the various time segments in thememory, i.e., the particular rows, that must have the logic statethereof changed in order to facilitate a move in the rising and fallingedges. The program then flows to a function block 812 when the last rowof memory associated with the Read sequence has been read out, i.e., atthe end of the duty cycle. At this point, the program will flip thememory between pages, i.e., perform the ping pong operation, and thenreturn to the input of the function block 804.

Although the preferred embodiment has been described in detail, itshould be understood that various changes, substitutions and alterationscan be made therein without departing from the spirit and scope of theinvention as defined by the appended claims.

1. A method for converting DC power from a first voltage level on aninput to a different voltage level on an output for delivery to a load,comprising the steps of: switching current in a switching operation fromthe input to the output through an inductive element; measuring thevoltage/current parameters on the input and output; determining with acontrol algorithm control parameters necessary to make a control move toeffect the switching operation, the control algorithm utilizing asinputs the measured voltage/current parameters; controlling theswitching operation with a digital control system, which digital controlsystem is operable to be controlled by the control algorithm; receivingconfiguration data on a serial data bus for configuring the controlalgorithm; and modifying the operation of the control algorithm inresponse to receiving the configuration information.
 2. The method ofclaim 1, wherein the step of modifying the operation occurs on the flywith the step of controlling.
 3. The method of claim 1, wherein theswitching operation is a pulse width controlled operation and the stepof controlling includes generating variable width control pulses with apulse width modulator (PWM).
 4. The method of claim 3, wherein the stepof generating includes the step of delaying at least one edge of one ofthe control pulses relative to another thereof in a common switchingcycle by a predetermined delay value, and the configuration dataincludes the predetermined delay value.
 5. The method of claim 1,wherein the digital control system includes an instruction basedprocessor for at least a portion of the operation thereof.
 6. The methodof claim 1, and further comprising the step of storing the configurationinformation in a memory.
 7. The method of claim 1, wherein the serialdata bus is an SM Bus.